<template>
	<view class="container">
		<custom-header title="密码管理"></custom-header>
		<view class="main-content">
			<!-- 密码列表 -->
			<view class="password-list">
				<!-- 登录密码 -->
				<view class="list-item" @click="handlePassword('find-password')">
					<text class="item-text">登录密码</text>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="divider"></view>

				<!-- 交易密码 -->
				<view class="list-item" @click="handlePassword('find-fund-password')" v-if="isShow">
					<text class="item-text">交易密码</text>
					<u-icon name="arrow-right"></u-icon>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isShow: uni.getStorageSync("isShow"),
			};
		},
		methods: {
			handlePassword(path) {
				uni.navigateTo({
					url: `/pages/${path}/${path}`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		background-color: #ffffff;
		height: 100vh;
	}

	.main-content {
		padding: 0 32rpx;
		margin-top: 40rpx;

		.password-list {
			background-color: #f8f8f8;
			border-radius: 16rpx;
			overflow: hidden;

			.list-item {
				display: flex;
				justify-content: space-between;
				align-items: center;
				padding: 32rpx;
				background-color: #ffffff;

				.item-text {
					font-size: 32rpx;
					color: #333333;
				}
			}

			.divider {
				height: 2rpx;
				background-color: #eeeeee;
				margin: 0 32rpx;
			}
		}

		.forget-password {
			margin-top: 40rpx;
			text-align: center;
			color: #007AFF;
			font-size: 28rpx;
			padding: 20rpx;
		}
	}
</style>